<layout name="mun" />
    <div class="operation_user clearfix">
        <div class="link fl"><a href="#">商城</a><span>&gt;&gt;</span><a href="#">管理员管理</a><span>&gt;&gt;</span>添加管理员</div>
        <div class="link fr">
            <a href="#" class="icon icon_i">首页</a><span></span>欢迎您！<span>Admin</span><a href="#" class="icon icon_e">退出</a>
        </div>
    </div>
    <div class="content clearfix">
        <div class="main">
            <!--右侧内容-->
            <div class="cont">
                <div class="title">添加管理员</div>
                <div class="details">
                	<div class="formDiv">
					  <div class="form-group">
					    <label for="userName" class="col-sm-2 control-label">账号</label>
					    <div class="col-sm-10">
					      <input type="email" class="form-control" id="username" value="{$rs[0]['username']}">
					    </div>
					  </div>
					  <div class="form-group">
					    <label for="password" class="col-sm-2 control-label">邮箱</label>
					    <div class="col-sm-10">
					      <input  class="form-control" id="email" value="{$rs[0]['email']}">
					    </div>
					  </div>
					  <div class="form-group">
					    <label for="password" class="col-sm-2 control-label">密码</label>
					    <div class="col-sm-10">
					      <input  class="form-control" id="password" value="{$rs[0]['password']}">
					    </div>
					  </div>
					  <div class="form-group">
					    <div class="col-sm-offset-2 col-sm-10">
					      <button id=xiugai class="btn btn-primary" value="{$rs[0]['id']}">提交</button>
					    </div>
					  </div>
					</div>
                </div>
            </div>
        </div>
	       <SCRIPT src="__JS__jquery-1.9.1.min.js" type="text/javascript"></SCRIPT>
        <script type="text/javascript">
        $(function(){
        	$('#xiugai').click(function(){
        		$.post("{:U('AdminIndex/doXiugai')}",{
        			id:$(this).val(),
        			username:$("#username").val(),
        			password:$("#password").val(),
        			email:$("#email").val()
        		},function(data){
        			if(data.status == 0){
        				alert(data.info);
        			}else{
        				alert(data.info);
        				location.href=data.url; 
        			}
        		});
        	});
        });
        </script>
	